In typical graphical user interfaces, several user interface elements exist to assist users in utilizing system operations. Included in these elements are menus, buttons, and lists. Most modern computer operating systems provide a set of system services that software developers can call to create such user interface elements. The MacOS Toolbox is the part of the MacOS operating system that provides these services for software intended to be deployed on Apple Macintosh systems, or compatibles.
The user interface elements typically display text strings, icons or other types of images to convey information to the user. Typically, the system services that implement these user interface elements allow only textual data by default. These services support other visual data formats only through extensibility hooks. To create these extensibility hooks and utilize the other visual data formats typically requires much effort on the part of software developers.
The original MacOS Toolbox provides this extensibility through the use of definition functions. For example, it implements standard definition functions for menus (MDEF=0), controls (CDEF=0), and lists (LDEF=0). These standard definition functions are capable of displaying only textual data. Software developers who wish to display other kinds of data in these elements, such as displaying a color palette in a menu, or an icon in a button must replace the standard definition function with their own implementations.
The programming interfaces for the definition functions for the various user interface elements are sufficiently different from each other that one custom definition function is normally incapable of being shared with different elements, such as drawing icons in both a button and a list. Software developers normally write a control definition function for the button, and a separate list definition function for the list, although a custom definition function was intended to be the same in each. The duplication of these definitions creates a larger code requirement for the system.
Accordingly, a need exists for a more direct and flexible system for associating customized types of visual data in user interface elements. The present invention addresses such a need.